package com.itheima.controller;

import com.itheima.common.R;
import com.itheima.service.DishService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author 小帅蓝
 * @Date 2022/6/23 20:18
 */
@RestController
@RequestMapping("/dish")
public class DishController {

    @Resource
    private DishService dishService;

    @GetMapping("/list")
    public R<List<DishAndCategoryVO>> dishList(String categoryId, Integer status) {
        return R.success(dishService.selectList(categoryId, status));
    }

}
